
int F[100][10000];
int w[100];
int v[100];

int main()
{
	int n, V;

	for (int i = 1; i <= n; i++) //枚举物品
	{
		for (int j = 1; j <= v[i]-1; j++) //枚举体积(存不下第i件物品的体积)
			F[i][j] = F[i-1][j];
		for (int j = v[i]; j <= V; j++) //枚举体积
			F[i][j] = std::max(F[i-1][j], F[i-1][j-v[i]] + w[i]);
	}

	printf("%d", F[n][V]);
	return 0;
}
